/**
	Audier1 - Commandline app to batch edit id3 tags in audio files
	
	Email	:	hypercas@gmail.com
	Created :	16/Feb/2011
	Modified:	19/Mar/2011
**/

#ifndef AUDIER_H
#define AUDIER_H

#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <iomanip>
#include <map>

#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/tokenizer.hpp>
#include <boost/lexical_cast.hpp>

#include <taglib/fileref.h>
#include <taglib/tag.h>

#include "image.h"

namespace Audier
{

namespace fs = boost::filesystem;

class Album
{
public:
	bool DirectoryGetFiles(fs::path dirpath);						//!< Get files of required extention in directory
	bool DirectoryGetPicture(fs::path dirpath);						//!< Find an image file
	
	bool FileUpdate(unsigned int file_id);							//!< Update a single file
	bool FileAutoProcess();											//!< Proccess entire directory

	void SetAlbum(const char *str)		{ab_meta["album"] = str;}
	void SetTitle(const char *str)		{ab_meta["title"] = str;}
	void SetYear(const char *str)		{ab_meta["year"] = str;}
	void SetArtist(const char *str)		{ab_meta["artist"] = str;}
	void SetGenre(const char *str)		{ab_meta["genre"] = str;}
	void SetPicture(const char *str)	{ab_meta["picture"] = str;}
	void SetFileExt(const char *str)	{ab_meta["file_ext"] = str;}
	void SetTrackStart(const char *str)	{ab_meta["track_start"] = str;}

	std::map<std::string,std::string>			ab_meta;			//!< Album meta data
	std::vector<std::string>					dir_files;			//!< Files in directory to process

	Album();														//!< Constructor

private:
	void CreateMetaMap();
};


}

#endif
